package com.jhhc.RHDB.Data.ServiceImpl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jhhc.RHDB.Data.Pojo.ST_PPTN_R_T;
import com.jhhc.RHDB.Data.Service.ST_PPTN_R_TService;
import com.jhhc.RHDB.Data.Dao.ST_PPTN_R_TMapper;


@Service
@Transactional
public class ST_PPTN_R_TServiceImpl implements ST_PPTN_R_TService {
    @Autowired
    private ST_PPTN_R_TMapper ST_PPTN_R_TMapper;


    @Override
    public List<ST_PPTN_R_T> selectByStationArry(String Stations, String startTime, String endTime) {
        // TODO Auto-generated method stub
        //String stcdArr=ArryToString(Stations);
        return ST_PPTN_R_TMapper.selectByStationArry(Stations, startTime, endTime);
    }


    public String ArryToString(List<String> Stations) {
        // TODO Auto-generated method stub
        String stcdArr = "";
        for (int i = 0; i < Stations.size(); i++) {
            if (!stcdArr.trim().isEmpty() || !stcdArr.trim().equals("")) {
                stcdArr = Stations.get(i) + "," + stcdArr;
            } else {
                stcdArr = Stations.get(i);
            }

        }
        System.out.println("这是stcdarr" + stcdArr);
        return stcdArr;
    }


    @Override
    public Integer update(String stcd, String time) {
        // TODO Auto-generated method stub
        return null;
    }


    @Override
    public int DeleteData(String Stations, String startTime, String endTime) {
        // TODO Auto-generated method stub
        return 0;
    }


    @Override
    public int InsertData(ST_PPTN_R_T t) {
        // TODO Auto-generated method stub
        return 0;
    }


    @Override
    public ST_PPTN_R_T sel() {
        // TODO Auto-generated method stub
        return ST_PPTN_R_TMapper.sel();
    }


}
